﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>选择管理区域</title>
    <link href="~/plugins/layui/css/layui.css" rel="stylesheet" />
</head>
<body style="margin-left:10px;margin-top:10px;">
    @using (Html.BeginForm("cityck", "ljsheng", FormMethod.Post, new { @class = "layui-form-pane layui-form"}))
    {
        <div class="layui-form-item">
            <label class="layui-form-label">管理省份</label>
            <div class="layui-input-inline">
                <select name="province" id="Province" lay-ignore>
                    <option></option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">管理城市</label>
            <div class="layui-input-inline">
                <select name="city" id="City" lay-ignore>
                    <option></option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">管理区域</label>
            <div class="layui-input-inline">
                <select name="area" id="Area" lay-ignore>
                    <option></option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">当前地域</label>
            <div class="layui-input-inline layui-form-mid layui-word-aux" style="color:#FF5722;">@(ViewBag.province==""?"全国": ViewBag.province) @ViewBag.city @ViewBag.area</div>
        </div>
        <div class="layui-form-item">
            <button class="layui-btn" lay-submit="">管理当前选择的地域</button>
        </div>
    }
    <script src="~/js/pca.js" charset="gb2312"></script>
    <script src="~/plugins/layui/layui.js"></script>
    <script>
        setup();
        if ("@ViewBag.province".length > 0) {
            preselect("@ViewBag.province");
            if ("@ViewBag.city".length > 0) {
                document.getElementById("City").value = "@ViewBag.city";
                change(2);
            }
            if ("@ViewBag.area".length > 0) {
                document.getElementById("Area").value = "@ViewBag.area";
            }
        }
        layui.use(['form'], function () {
            var form = layui.form();
        });
    </script>
</body>
</html>
